package pATT.profilingAlgorithm.PersonalSearcher;



import java.util.StringTokenizer;





public class FrequencyVectorCreator extends AbstractVectorCreator {
  
	public TermVector getVector(Document d){

		TermVector newKeywords = new TermVector();
		StringTokenizer st = new StringTokenizer(d.getIndexibleContent());

		while(st.hasMoreTokens()){
			String thisWord = st.nextToken();
			thisWord = thisWord.toLowerCase();
			double score = newKeywords.get(thisWord);
			newKeywords.put(thisWord, score + 1);
		}

		cleanUp(newKeywords);
    
    	return newKeywords;
	}
}
